import * as Constant from '../constants/Constant'

const initialState={
	news:[],
	newsDetail:{
	}
};

export default function news(state=initialState,action){
	switch(action.type){
		case Constant.NEWS_SHOW_ALL:
			return Object.assign({}, state, {
		        news: action.news
		      })
		case Constant.NEWS_DETAIL:
			return Object.assign({}, state, {
		        newsDetail:action.newsDetail
		      })
		default:
			return state
	}
}
